from machine import Pin, SPI

from st7735 import ST7735

spi = SPI(2, baudrate=80000000, polarity=0, phase=0, bits=8, firstbit=0, sck=Pin(2), mosi=Pin(3))
lcd = ST7735(80, 160, spi, dc=Pin(6), cs=Pin(7), rst=Pin(10), rot=0, bgr=0)

lcd.font_load('./GB2312-12.fon')

lcd.text("中文测试test", 10, 10, 0xffff)
lcd.show()

lcd.fill(0xffff)
lcd.show()
